/*
 *  This file is part of the SIRIUS libraries for analyzing MS and MS/MS data
 *
 *  Copyright (C) 2024 Bright Giant GmbH
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along with SIRIUS.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 *  https://openapi-generator.tech
 *  Do not edit the class manually.
 */


package io.sirius.ms.sdk.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.sirius.ms.sdk.model.Category;
import io.sirius.ms.sdk.model.DataQuality;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * EXPERIMENTAL: This schema is experimental and may be changed (or even removed) without notice until it is declared stable.
 */
@JsonPropertyOrder({
  AlignedFeatureQualityExperimental.JSON_PROPERTY_ALIGNED_FEATURE_ID,
  AlignedFeatureQualityExperimental.JSON_PROPERTY_OVERALL_QUALITY,
  AlignedFeatureQualityExperimental.JSON_PROPERTY_CATEGORIES
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0")
public class AlignedFeatureQualityExperimental {
  public static final String JSON_PROPERTY_ALIGNED_FEATURE_ID = "alignedFeatureId";
  @jakarta.annotation.Nonnull
  private String alignedFeatureId;

  public static final String JSON_PROPERTY_OVERALL_QUALITY = "overallQuality";
  @jakarta.annotation.Nullable
  private DataQuality overallQuality;

  public static final String JSON_PROPERTY_CATEGORIES = "categories";
  @jakarta.annotation.Nonnull
  private Map<String, Category> categories = new HashMap<>();

  public AlignedFeatureQualityExperimental() {
  }

  public AlignedFeatureQualityExperimental alignedFeatureId(@jakarta.annotation.Nonnull String alignedFeatureId) {
    
    this.alignedFeatureId = alignedFeatureId;
    return this;
  }

  /**
   * Id of the feature (aligned over runs) this quality information belongs to.
   * @return alignedFeatureId
   */
  @jakarta.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_ALIGNED_FEATURE_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getAlignedFeatureId() {
    return alignedFeatureId;
  }


  @JsonProperty(JSON_PROPERTY_ALIGNED_FEATURE_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setAlignedFeatureId(@jakarta.annotation.Nonnull String alignedFeatureId) {
    this.alignedFeatureId = alignedFeatureId;
  }

  public AlignedFeatureQualityExperimental overallQuality(@jakarta.annotation.Nullable DataQuality overallQuality) {
    
    this.overallQuality = overallQuality;
    return this;
  }

  /**
   * Get overallQuality
   * @return overallQuality
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_OVERALL_QUALITY)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public DataQuality getOverallQuality() {
    return overallQuality;
  }


  @JsonProperty(JSON_PROPERTY_OVERALL_QUALITY)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setOverallQuality(@jakarta.annotation.Nullable DataQuality overallQuality) {
    this.overallQuality = overallQuality;
  }

  public AlignedFeatureQualityExperimental categories(@jakarta.annotation.Nonnull Map<String, Category> categories) {
    
    this.categories = categories;
    return this;
  }

  public AlignedFeatureQualityExperimental putCategoriesItem(String key, Category categoriesItem) {
    this.categories.put(key, categoriesItem);
    return this;
  }

  /**
   * Contains all pre-computation quality information that belong to  this feature (aligned over runs), such as information about the quality of the peak shape, MS2 spectrum etc.,
   * @return categories
   */
  @jakarta.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_CATEGORIES)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public Map<String, Category> getCategories() {
    return categories;
  }


  @JsonProperty(JSON_PROPERTY_CATEGORIES)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setCategories(@jakarta.annotation.Nonnull Map<String, Category> categories) {
    this.categories = categories;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    AlignedFeatureQualityExperimental alignedFeatureQualityExperimental = (AlignedFeatureQualityExperimental) o;
    return Objects.equals(this.alignedFeatureId, alignedFeatureQualityExperimental.alignedFeatureId) &&
        Objects.equals(this.overallQuality, alignedFeatureQualityExperimental.overallQuality) &&
        Objects.equals(this.categories, alignedFeatureQualityExperimental.categories);
  }

  @Override
  public int hashCode() {
    return Objects.hash(alignedFeatureId, overallQuality, categories);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class AlignedFeatureQualityExperimental {\n");
    sb.append("    alignedFeatureId: ").append(toIndentedString(alignedFeatureId)).append("\n");
    sb.append("    overallQuality: ").append(toIndentedString(overallQuality)).append("\n");
    sb.append("    categories: ").append(toIndentedString(categories)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

